﻿(function (b) {
    b.cf = {
        logType: {
            debug: "[ D ]",
            warning: "[ W ]",
            error: "[ E ]"
        },
        logToConsole: !1,
        log: function (a, c) {
            if (!("logToConsole" in b.cf) || b.cf.logToConsole) {
                c = c ? c : b.cf.logType.debug;
                try {
                    console.log(c + " " + a)
                } catch (d) { }
            }
        },
        noteType: {
            alert: "alert",
            message: "message",
            warning: "warning",
            error: "error",
            status: {
                full: "status-full",
                compact: "status-compact"
            }
        },
        notify: function (a, c, d) {
            if (a) {
                var c = c ? c : b.cf.noteType.message,
                d = d ? -1 != d ? 1E3 * d : d : 1E4,
                e = b('<li class="note ' + c + '"><h1>' + c.toUpperCase() + '</h1><a href="javascript:void(0);" class="dismiss">Dismiss</a><p class="message">' + a + "</p></li>");
                b("#Notifications").prepend(e);
                e.hide().slideDown(400,
                function () {
                    -1 != d && setTimeout(function () {
                        e.slideUp(400,
                        function () {
                            e.remove()
                        })
                    },
                        d)
                });
                e.find("a.dismiss").click(function () {
                    e.slideUp(400,
                    function () {
                        e.remove()
                    });
                    return !1
                })
            }
        },
        notifyStatus: function (a) {
            if (a) {
                var a = b.extend({
                    full: "",
                    compact: "",
                    start: b.cf.noteType.status.full,
                    onDismiss: b.noop
                },
                a),
                c = b('<li class="note status ' + a.start + '"><p class="msg msg-full">' + a.full + '</p><p class="msg msg-compact">' + a.compact + '</p><a href="javascript:void(0);" class="dismiss">Dismiss</a></li>');
                b("#Notifications").prepend(c);
                c.hide().slideDown(400);
                c.find("a.dismiss, a.expand").click(function () {
                    b(this).hasClass("dismiss") ? (c.removeClass("status-full").addClass("status-compact"), a.onDismiss()) : b(this).hasClass("expand") && c.removeClass("status-compact").addClass("status-full");
                    return !1
                })
            }
        },
        clearNotifications: function () {
            var a = b("#Notifications > .note:not(.note.dying)");
            a.addClass("dying");
            a.fadeOut(400,
            function () {
                a.remove()
            })
        },
        mouseX: -1,
        mouseY: -1,
        buildOptions: function (a, c) {
            var d = b(a),
            e = "",
            f,
            g = function (a, b) {
                f = ' value="' + a + '"' + (a == c.selected ? ' selected="true" checked="true"' : "");
                e += "<option" + f + ">" + b + "</option>"
            };
            d.is(":not([multiple])") && c.placeholder && g("", c.placeholder);
            c.data && b.each(c.data, g);
            d.append(e)
        },
        modalStateEnabled: !1,
        loadModalDialog: function (a, c) {
            var c = b.extend({
                title: "Untitled Dialog",
                buttons: {
                    Okay: function () {
                        b("#ModalDialog").dialog("close")
                    }
                },
                modal: !0,
                position: "center",
                draggable: !1,
                resizable: !1,
                width: 500,
                maxHeight: 600,
                open: function () {
                    b(".ui-dialog:has(#ModalDialog)").hide().children().wrapAll(b('<div class="inner"></div>'));
                    b(".ui-widget-overlay").hide().fadeIn(600)
                },
                beforeClose: function (a) {
                    var e = this;
                    a.preventDefault();
                    b(".ui-dialog:has(#ModalDialog)").css({
                        marginTop: "0",
                        opacity: "1"
                    }).show().animate({
                        marginTop: "-20px",
                        opacity: "0"
                    },
                    400, "easeOutExpo",
                    function () {
                        b(".ui-widget-overlay").fadeOut(200,
                        function () {
                            b.cf.modalStateEnabled = !1;
                            b("#ModalDialog").dialog("destroy").remove();
                            b("#ModalComponent").remove();
                            c.close && c.close.call(e, a)
                        })
                    })
                },
                close: function (a) {
                    a.preventDefault()
                },
                contentReady: function () { }
            },
            c),
            a = b.extend({
                url: "/ajax/modal-dialog.html",
                type: "default"
            },
            a),
            d = function () {
                b.cf.notify('There was an error launching a modal dialog. Please try again, and if the problem persists, contact <a href="mailto:support@cloudflare.com">support@cloudflare.com</a>!', b.cf.noteType.error)
            };
            b.each(c.buttons,
            function (a, e) {
                var d = b.isFunction(e),
                j = (d ? e : e.click) || b.noop,
                i = function (c) {
                    var i = b(c.target),
                    i = i.is("button") ? i : i.closest("button");
                    if (i.hasClass("disabled")) return !1;
                    i.addClass("disabled submitting");
                    j.apply(this, arguments);
                    b("#ModalComponent").triggerHandler("modalbutton", {
                        name: d ? a : e.name
                    })
                };
                c.buttons[a] = d ? i : {
                    text: e.text,
                    click: i
                }
            });
            if (!b.cf.modalStateEnabled) {
                b.cf.modalStateEnabled = !0;
                var e = a.url;
                delete a.url;
                b.ajax({
                    url: e,
                    dataType: "html",
                    type: "POST",
                    data: a,
                    error: d,
                    success: function (a) {
                        try {
                            b("#HiddenContent").append(a)
                        } catch (e) {
                            b.cf.log("There was an error creating a DOM node from the retrieved HTML!", b.cf.logType.error),
                            d()
                        }
                        b("#ModalComponent").bind("contentready",
                        function (a) {
                            b("#ModalDialog").dialog("option", "position", "center");
                            b(".ui-dialog:has(#ModalDialog)").css({
                                marginTop: "40px",
                                opacity: "0"
                            }).show().animate({
                                marginTop: "0",
                                opacity: "1"
                            },
                            400, "easeOutExpo");
                            c.contentReady && c.contentReady(a)
                        }).bind("modalclose",
                        function () {
                            b("#ModalDialog").dialog("close")
                        });
                        b("#ModalDialog").dialog(c);
                        b("#ModalComponent").triggerHandler("modalready")
                    }
                })
            }
        },
        withModalConfirmation: function (a) {
            var c = b.Deferred(),
            d = !1,
            e = function () {
                b("#ModalDialog").dialog("close")
            },
            a = b.extend({
                content: "",
                title: "",
                width: 800,
                submitLabel: "Confirm",
                cancelLabel: ""
            },
            a);
            b.cf.loadModalDialog({
                content: a.content
            },
            {
                title: a.title,
                width: a.width,
                dialogClass: "cf-dialog-one-button",
                buttons: [{
                    text: a.submitLabel,
                    click: function () {
                        d = !0;
                        c.then(e).resolve()
                    }
                },
                {
                    text: a.cancelLabel,
                    click: function () {
                        d || (e(), c.reject())
                    }
                }],
                close: function () {
                    d || c.reject()
                }
            });
            return c
        },
        mapWithDelays: function (a, c, d) {
            var d = d || 0,
            e = b.map(a,
            function () {
                return b.Deferred()
            }),
            f = a.length - 1,
            g = function () {
                doAddZone(a[f]);
                e[f].resolve();
                f-- && setTimeout(g, d)
            };
            g();
            return e
        },
        proxyNoisyDelay: function (a, c, d) {
            var e = b.Deferred(),
            f,
            d = d || c || [0, 0],
            d = b.isArray(d) ? d : [d, d];
            f = d[0];
            d = d[1] - d[0];
            f = Math.random() * d + f;
            setTimeout(function () {
                a.call(c);
                e.resolve()
            },
            f);
            return e
        },
        trackEvent: function (a, c, d) {
            var e = "";
            window._gaq && (b.cf.data.spoofing && (e = "[Internal] "), _gaq.push(["_trackEvent", e + a, c, d]))
        },
        trackPageView: function (a, b) {
            window._gaq && _gaq.push(["_trackPageview", a, b])
        },
        atok: function () {
            return b.cf.data && b.cf.data.atok
        }
    };
    b.extend(b.fn, {
        tooltip: function (a) {
            a = b.extend({
                backgroundColor: "#3c5466",
                textCSS: {
                    color: "#ffffff"
                },
                text: null,
                offset: 10,
                delay: 500,
                width: null,
                showOn: "mouseenter",
                hideOn: "mouseleave",
                forceMouse: !1,
                autoPointer: !0,
                align: "center",
                shadow: !0,
                attributes: ["tooltip", "alt", "value", "href", "rel"],
                customClass: null,
                customContent: function () { }
            },
            a);
            this.each(function (c, d) {
                var e = b(d),
                f;
                if (a.text) f = a.text;
                else a: {
                    for (f = 0; f < a.attributes.length; f++) if (void 0 != e.attr(a.attributes[f])) {
                        f = e.attr(a.attributes[f]);
                        break a
                    }
                    f = void 0
                }
                var g = f,
                h, j, i, l, k, m = !1;
                e.data("tooltip", {
                    showOn: a.showOn,
                    hideOn: a.hideOn,
                    showTip: function () {
                        m || (l = setTimeout(function () {
                            if (b.contains(document, e.get(0))) {
                                h = b('<div class="tooltip"></div>').appendTo("body").css({
                                    width: a.width ? a.width + "px" : null,
                                    opacity: 0
                                }).hide();
                                a.shadow && h.addClass("shadow");
                                a.extraClass && h.addClass(a.extraClass);
                                b('<div class="tip"><p>' + g + "</p></div>").appendTo(h).css(b.extend({
                                    background: a.backgroundColor
                                },
                                a.textCSS));
                                a.customContent && (k = b.isFunction(a.customContent) ? a.customContent(h.children().first()) : a.customContent, k instanceof jQuery && k.appendTo(h.children().first()));
                                if (a.forceMouse) j = b.cf.mouseX - h.outerWidth() / 2,
                                i = b.cf.mouseY + a.offset;
                                else switch (i = e.offset().top + (e.outerHeight() + a.offset), a.align) {
                                    default:
                                    case "center":
                                        j = e.offset().left + (e.outerWidth() / 2 - h.outerWidth() / 2);
                                        break;
                                    case "left":
                                        j = e.offset().left;
                                        break;
                                    case "right":
                                        j = e.offset().left + e.outerWidth() - h.outerWidth();
                                        break;
                                    case "right-margin-top":
                                        j = e.offset().left + e.outerWidth(),
                                        i = e.offset().top
                                }
                                h.css({
                                    top: i + 10 + "px",
                                    left: j + "px"
                                }).show().animate({
                                    opacity: 1,
                                    top: i + "px"
                                },
                                200);
                                k && k.trigger("visible")
                            } else e.mouseleave()
                        },
                        a.delay), m = !0)
                    },
                    hideTip: function () {
                        m && (l && clearTimeout(l), null != h && h.stop().animate({
                            opacity: 0,
                            top: i - 10 + "px"
                        },
                        200,
                        function () {
                            h.remove();
                            h = null;
                            a.forceMouse && e.clearTooltip()
                        }), m = !1)
                    }
                });
                a.forceMouse ? e.bind(e.data("tooltip").hideOn + " remove", e.data("tooltip").hideTip).data("tooltip").showTip() : e.bind(e.data("tooltip").showOn, e.data("tooltip").showTip).bind(e.data("tooltip").hideOn + " remove", e.data("tooltip").hideTip)
            });
            return this
        },
        clearTooltip: function () {
            this.each(function (a, c) {
                var d = b(c);
                d.data("tooltip") && (d.data("tooltip").hideTip(), d.unbind(d.data("tooltip").showOn, d.data("tooltip").showTip).unbind(d.data("tooltip").hideOn + " remove", d.data("tooltip").hideTip))
            });
            return this
        },
        //弹出Tips 文本框
        placeholder: function () { },
        copyToClipboard: function (a) {
            a = b.extend({
                caption: "Press 'control/command + c' to copy:",
                copyTarget: null,
                copyText: null,
                attributes: ["clipboard", "alt", "value", "href", "rel"],
                tooltipOptions: {}
            },
            a);
            this.each(function () {
                var c = b(this),
                d = !1;
                if (!a.copyText) {
                    var e = a.copyTarget || c;
                    b.each(a.attributes,
                    function (b, c) {
                        if (e.attr(c)) return a.copyText = e.attr(c),
                        !1
                    })
                }
                d = a.copyText || "Undefined";
                c.tooltip(b.extend({
                    delay: 150
                },
                a.tooltipOptions, {
                    text: a.caption,
                    customContent: function () {
                        return b('<input class="clipboard" type="text" value="' + d + '" />').bind("visible",
                        function () {
                            this.select()
                        })
                    }
                }))
            })
        },
        truncate: function () {
            return this.filter(function (a, c) {
                var d = b(c),
                e = d.attr("style"),
                f = d.css({
                    display: "inline-block",
                    whiteSpace: "nowrap",
                    overflow: "hidden"
                }).width(),
                g = d.css({
                    width: "auto"
                }).width();
                e ? d.attr("style", e) : (d.attr("style", ""), d.removeAttr("style"));
                return f < g
            }).map(function (a, c) {
                var d = b(c),
                e = d.is(".abbreviatable") ? d : d.find(".abbreviatable");
                e.length || (e = d);
                d.addClass("truncated");
                e.addClass("abbreviated").attr("title", e.text())
            })
        },
        removeClassRegExp: function (a) {
            return this.replaceClassRegExp(a, "")
        },
        replaceClassRegExp: function (a, b) {
            return this.replaceAttr("class", a, b)
        },
        replaceAttr: function (a, b, d) {
            b = RegExp("(^| ) *" + b + " *", "g");
            return this.attr(a, this.attr(a).replace(b, " ") + " " + d)
        }
    });
    b(document).bind("mousemove",
    function (a) {
        b.cf.mouseX = a.pageX;
        b.cf.mouseY = a.pageY
    })
})(jQuery);
(jQuery); (function (b) {
    b.extend(b.cf, {
        passwordHash: "111111 11111111 112233 121212 123123 123456 1234567 12345678 131313 232323 654321 666666 696969 777777 7777777 8675309 987654 aaaaaa abc123 abc123 abcdef abgrtyu access access14 action albert alexis amanda amateur andrea andrew angela angels animal anthony apollo apples arsenal arthur asdfgh asdfgh ashley asshole august austin badboy bailey banana barney baseball batman beaver beavis bigcock bigdaddy bigdick bigdog bigtits birdie bitches biteme blazer blonde blondes blowjob blowme bond007 bonnie booboo booger boomer boston brandon brandy braves brazil bronco broncos bulldog buster butter butthead calvin camaro cameron canada captain carlos carter casper charles charlie cheese chelsea chester chicago chicken cocacola coffee college compaq computer cookie cooper corvette cowboy cowboys crystal cumming cumshot dakota dallas daniel danielle debbie dennis diablo diamond doctor doggie dolphin dolphins donald dragon dreams driver eagle1 eagles edward einstein erotic extreme falcon fender ferrari firebird fishing florida flower flyers football forever freddy freedom fucked fucker fucking fuckme fuckyou gandalf gateway gators gemini george giants ginger golden golfer gordon gregory guitar gunner hammer hannah hardcore harley heather helpme hentai hockey hooters horney hotdog hunter hunting iceman iloveyou internet iwantu jackie jackson jaguar jasmine jasper jennifer jeremy jessica johnny johnson jordan joseph joshua junior justin killer knight ladies lakers lauren leather legend letmein letmein little london lovers maddog madison maggie magnum marine marlboro martin marvin master matrix matthew maverick maxwell melissa member mercedes merlin michael michelle mickey midnight miller mistress monica monkey monkey monster morgan mother mountain muffin murphy mustang naked nascar nathan naughty ncc1701 newyork nicholas nicole nipple nipples oliver orange packers panther panties parker password password password1 password12 password123 patrick peaches peanut pepper phantom phoenix player please pookie porsche prince princess private purple pussies qazwsx qwerty qwertyui rabbit rachel racing raiders rainbow ranger rangers rebecca redskins redsox redwings richard robert rocket rosebud runner rush2112 russia samantha sammy samson sandra saturn scooby scooter scorpio scorpion secret sexsex shadow shannon shaved sierra silver skippy slayer smokey snoopy soccer sophie spanky sparky spider squirt srinivas startrek starwars steelers steven sticky stupid success suckit summer sunshine superman surfer swimming sydney taylor tennis teresa tester testing theman thomas thunder thx1138 tiffany tigers tigger tomcat topgun toyota travis trouble trustno1 tucker turtle twitter united vagina victor victoria viking voodoo voyager walter warrior welcome whatever william willie wilson winner winston winter wizard xavier xxxxxx xxxxxxxx yamaha yankee yankees yellow zxcvbn zxcvbnm zzzzzz".split(" ")
    })
})(jQuery);
(function (b) {
    b.extend(b.cf, {
        validation: {
            hasValue: function (a) {
                return null !== a && void 0 !== a && "" !== a
            },
            email: function (a) {
                return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)
            },
            url: function (a) {
                return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)
            },
            domain: function (a) {
                a = b.trim(a);
                /^((https?|ftp):)?\/\//.test(a) || (a = "http://" + a);
                return b.cf.validation.url(a)
            },
            date: function (a) {
                return ! /Invalid|NaN/.test(new Date(a))
            },
            dateISO: function (a) {
                return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)
            },
            number: function (a) {
                return /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)
            },
            digits: function (a) {
                return /^\d+$/.test(a)
            },
            creditcard: function (a) {
                a = a.replace(/\D/g, "");
                return !a || /[^0-9-]+/.test(a) || 14 > a.length || 18 < a.length ? !1 : !0
            },
            listOf: function (a, c) {
                c = b.extend({
                    emptyOk: !1
                },
                c);
                return function (d) {
                    var e = d.split(","),
                    e = b.map(e, b.trim);
                    if (c.emptyOk && "" == d) return !0;
                    filter = c.emptyOk ?
                    function (b) {
                        return a(b) || "" == b
                    } : a;
                    return !b.grep(e, filter, !0).length
                }
            }
        },
        rating: {
            passwordStrength: function (a) {
                var c = /[a-z]/.test(a),
                d = /[A-Z]/.test(a.substring(0, 1).toLowerCase() + a.substring(1)),
                e = /[0-9]/.test(a);
                /[0-9].*[0-9]/.test(a);
                var f = /[^a-zA-Z0-9]/.test(a),
                g = /^(.)\1+$/.test(a);
                return !a || 6 > a.length || 0 <= b.inArray(a.toLowerCase(), b.cf.passwordHash) || g ? 0 : (c && d && e || c && e && f || d && e && f) && 8 <= a.length || 20 <= a.length ? 1 : (c && d || c && e || d && e || c && f || e && f) && 6 < a.length ? 0.66 : 0.33
            }
        },
        resolveCreditcardType: function (a) {
            a = a.replace(/\D/g, "");
            return /^(51|52|53|54|55)/.test(a) ? "mastercard" : /^(4)/.test(a) ? "visa" : /^(34|37)/.test(a) ? "amex" : /^(6011)/.test(a) ? "discover" : !1
        }
    });
    b.extend(b.fn, {
        rateValue: function (a) {
            a = b.extend({
                by: b.cf.rating.passwordStrength
            },
            a);
            this.each(function () {
                var c = b(this);
                if (c.is('input[type="text"]') || c.is('input[type="password"]')) {
                    var d = b('<div class="rating"></div>').insertAfter(c),
                    e = b('<div class="mask"></div>').appendTo(d);
                    c.bind("keyup blur",
                    function () {
                        var b = Math.min(a.by(c.val()), 1);
                        e.fadeTo(100, Math.max(1 - Math.abs(b), 0));
                        1 > b ? d.addClass("weak") : d.removeClass("weak")
                    });
                    c.bind("valid",
                    function () {
                        d.removeClass("invalid")
                    });
                    c.bind("invalid",
                    function () {
                        d.addClass("invalid")
                    })
                }
            })
        },
        valid: function (a) {
            var a = b.extend({
                iff: b.cf.validation.hasValue,
                errorDisplayTarget: null,
                useTooltip: !0
            },
            a),
            c = {
                "default": {
                    showOn: "invalid",
                    hideOn: "valid",
                    delay: 0,
                    offset: 0,
                    align: "left",
                    backgroundColor: "transparent",
                    textCSS: {
                        color: "#cc2929",
                        fontWeight: "normal"
                    },
                    shadow: !1,
                    autoPointer: !1,
                    attributes: ["error"],
                    customContent: function (a) {
                        var c = a.text();
                        a.text("");
                        return b('<span class="cf-icon inline invalid"></span><span>' + c + "</span>")
                    }
                }
            };
            c["right-margin-top"] = b.extend({},
            c["default"], {
                align: "right-margin-top",
                width: "210"
            });
            c["bottom-margin-right"] = b.extend({},
            c["default"], {
                align: "right"
            });
            this.each(function () {
                var d = b(this),
                e = a.errorDisplayTarget || d,
                f = function () {
                    return "checkbox" == d.attr("type") ? d.is(":checked") : d.val()
                };
                e != d && e.attr("error", d.attr("error"));
                if (d.is("input") || d.is("textarea")) {
                    var g = /tooltip-([^ ]*)/.exec(d.attr("class")),
                    g = g && g[1] in c ? g[1] : "default";
                    a.useTooltip && e.tooltip(c[g]);
                    d.data("validField", !1);
                    d.bind("keyup",
                    function () {
                        var b = a.iff(f());
                        d.data("validField") && !b ? (d.data("validField", !1).addClass("invalid"), e.trigger("invalid")) : b && (d.data("validField", !0).removeClass("invalid"), e.trigger("valid"))
                    });
                    d.bind("change",
                    function () {
                        a.iff(f()) ? (d.data("validField", !0).removeClass("invalid"), e.trigger("valid")) : (d.data("validField", !1).addClass("invalid"), e.trigger("invalid"))
                    });
                    d.bind("blur",
                    function () {
                        a.iff(f()) ? (d.data("validField", !0).removeClass("invalid"), e.trigger("valid")) : (d.data("validField", !1).addClass("invalid"), e.trigger("invalid"))
                    })
                }
            });
            return this
        },
        areValid: function (a) {
            var a = b.extend({
                blur: !0,
                redispatch: !1
            },
            a),
            c = !0;
            a.blur && this.blur();
            this.each(function () {
                var d = b(this); !1 === d.data("validField") && (c = !1, a.redispatch && d.trigger("invalid"))
            });
            return c
        },
        resetValidation: function () {
            this.each(function () {
                b(this).removeData("validField").removeClass("invalid").trigger("valid")
            })
        }
    })
})(jQuery);

(function (b) {
    b.extend(b.cf, {
        windowProperties: function () {
            var a = 0,
            b = 0,
            d = 0,
            e = 0;
            window.document.innerHeight && 0 < window.document.innerHeight ? (a = window.document.innerWidth, b = window.document.innerHeight, d = window.pageXOffset, e = window.pageYOffset) : window.document.documentElement.clientHeight && window.document.documentElement.clientHeight > b ? (a = window.document.documentElement.clientWidth, b = window.document.documentElement.clientHeight, d = document.documentElement.scrollLeft, e = document.documentElement.scrollTop) : window.document.body.clientHeight && window.document.body.clientHeight > b && (a = window.document.body.clientWidth, b = window.document.body.clientHeight, d = document.body.scrollLeft, e = document.body.scrollTop);
            return {
                width: a,
                height: b,
                x: d,
                y: e
            }
        },
        normalizeCSSMeasurement: function (a) {
            a = b.isFunction(a) ? a() : a;
            return "number" == typeof a || "string" == typeof a && !("px" == a.substr(a.length - 2, 2) || "%" == a.substr(a.length - 1, 1)) ? a + "px" : a
        },
        normalizeDigitalMeasurement: function (a) {
            a = b.isFunction(a) ? a() : a;
            return "string" == typeof a ? "px" == a.substr(a.length - 2, 2) ? parseInt(a.substr(0, a.length - 2)) : "%" == a.substr(a.length - 1, 1) ? -1 : parseInt(a) : a
        }
    });
    b.extend(b.fn, {
        margin: function () {
            var a = this.css("marginTop").substr(0, this.css("marginTop").length - 2),
            b = this.css("marginBottom").substr(0, this.css("marginBottom").length - 2),
            d = this.css("marginLeft").substr(0, this.css("marginLeft").length - 2),
            e = this.css("marginRight").substr(0, this.css("marginRight").length - 2);
            return {
                top: a,
                bottom: b,
                left: d,
                right: e,
                horizontal: d + e,
                vertical: a + b
            }
        },
        marginalWidth: function () {
            return this.width() + this.margin().horizontal
        },
        marginalInnerWidth: function () {
            return this.innerWidth() + this.margin().horizontal
        },
        marginalOuterWidth: function () {
            return this.outerWidth() + this.margin().horizontal
        },
        marginalHeight: function () {
            return this.height() + this.margin().vertical
        },
        marginalInnerHeight: function () {
            return this.innerHeight() + this.margin().vertical
        },
        marginalOuterHeight: function () {
            return this.outerHeight() + this.margin().vertical
        },
        scrollTopMax: function () {
            return this.get(0).scrollHeight - this.innerHeight()
        }
    });
    b.cf.Request = function (a) {
        b.extend(this, a)
    };
    b.cf.Request.prototype = {
        name: "",
        url: "",
        data: {},
        type: "GET",
        formatQuery: function (a) {
            return a
        },
        formatResponse: function (a) {
            return this.lastResult = a
        },
        clone: function () {
            return b.extend({},
            this)
        }
    };
    b.cf.MultiRequest = function (a) {
        this.requests = a ? a : []
    };
    b.cf.MultiRequest.prototype = {
        requests: [],
        addRequest: function (a) {
            a instanceof b.cf.Request ? this.requests.push(nameOrRequest) : this.requests.push(new b.cf.Request(a))
        },
        clone: function () {
            return b.extend({},
            this)
        }
    };
    b.cf.Query = function (a) {
        if (this === window || this === b.cf) return !1;
        b.extend(this, a)
    };
    b.cf.Query.prototype = {
        id: "",
        url: "",
        data: {},
        type: "POST",
        dataType: "json",
        async: true,
        cache: true,
        lastResponse: null,
        mapQuery: function (a) {
            return a.data
        },
        mapResponse: function (a) {
            return a
        },
        query: function (a) {
            var c = this,
            d = b.cf.atok(),
            a = a ? a : b.noop;
            return b.ajax({
                url: c.url ? c.url : "do.ashx",
                type: "POST",
                async: true,
                data: function () {
                    var a = c.mapQuery(c);
                    d && b.extend(a, {
                        atok: d
                    });
                    return a
                }(),
                dataType: "json",
                error: function () {
                    a(false)
                },
                success: function (e) {
                    c.lastResponse = e;
                    "error" === e.result && "redirect" in e && "invalid_atok" === e.redirect.details ? (b.cf.notify("Your session needs to be refreshed, or your network settings have changed. Please refresh the page and try again. If the problem continues, please contact support!", b.cf.noteType.alert), a(!1)) : a(c.mapResponse(e), c)
                }
            })
        },
        withData: function (a) {
            var c = b.extend(new b.cf.Query, this);
            b.extend(c.data, a);
            return c
        },
        withAct: function (a) {
            var c = b.extend(new b.cf.Query, this);
            c.url ? c.data.act = a : c.act = a;
            return c
        },
        withUrl: function (a) {
            var c = b.extend(new b.cf.Query, this);
            c.url = a;
            return c
        }
    };
    b.cf.MockQuery = function (a) {
        b.extend(this, a)
    };
    b.cf.MockQuery.prototype = b.extend(new b.cf.Query, {
        url: "",
        query: function (a) {
            a(this.mapResponse(this.mapQuery(this)));
            return b.Deferred().resolve()
        }
    });
    b.cf.fragment = function (a) {
        this.options = a
    };
    b.cf.fragment.prototype.attach = function (a) {
        var c = this,
        d = c.options.children;
        d && (b.each(d,
        function (c, d) {
            b(a).append(d)
        }), b.each(d,
        function (a, b) {
            if (c.options.widget && c.options.widget in b) b[c.options.widget]("onAttach")
        }))
    };
    b.cf.fragment.prototype.addChild = function (a) {
        this.options.children.push(a)
    }
})(jQuery);


(function (a) {
    a(function () {
        a("#EmailConfirm").valid({
            iff: function (b) {
                return b == a("#Email").val()
            }
        });
        a("#Username").valid({
            iff: function (a) {
                return 3 < a.length
            }
        });
        a("#Password").rateValue();
        a("#Password").valid({
            iff: function (b) {
                return a.cf.validation.hasValue(b) && 0 < a.cf.rating.passwordStrength(b)
            }
        });
        a("#PasswordConfirm").valid({
            iff: function (b) {
                return a.cf.validation.hasValue(b) && b == a("#Password").val()
            }
        });
        a("#KeyCode").valid({
            iff: function (a) {
                return 3 < a.length
            }
        });
        a("#Agree").valid({
            iff: function () {
                return a("#Agree").is(":checked")
            }
        });
        a("#QTitle").valid({
            iff: function (a) {
                return 4 < a.length
            }
        });
        a("#QContent").valid({
            iff: function (a) {
                return 19 < a.length
            }
        });
        var userSignup = new a.cf.Query({
            act: "userSignup",
            mapResponse: function (b) {
                "error" == b.result ? a.cf.notify(b.msg, a.cf.noteType.error) : location.href = b.redirect ? b.redirect.url : "/my-websites.html"
            }
        });
        a("#SubUserReg").bind("click",
        function () {
            a(".form input").areValid() && (a.extend(userSignup.data, {
                user_email: a("#Email").val(),
                user_email2: a("#EmailConfirm").val(),
                user_name: a("#Username").val(),
                user_pass: a("#Password").val(),
                user_pass2: a("#PasswordConfirm").val(),
                KeyCode: a("#KeyCode").val(),
                terms: "on" == a("#Agree").val() ? 1 : 0
            }), userSignup.query())
        });


        var ask = new a.cf.Query({
            mapResponse: function (b) {
                "error" == b.result ? a.cf.notify(b.msg, a.cf.noteType.error) : location.href = b.redirect ? b.redirect.url : "/my-websites.html"
            }
        });
        a("#SubAsk").bind("click",
        function () {
            a(".form input").areValid() && (a.extend(ask.data, {
                act: "ask",
                qTitle: a("#QTitle").val(),
                qContent: editor.fullHtml()
            }), ask.query())
        })
    })
})(jQuery);